// 全局样式文件

/* CSS重置 */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  height: 100%;
  font-size: 14px;
}

body {
  height: 100%;
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, 
               'Noto Sans', sans-serif, 'Apple Color Emoji', 'Segoe UI Emoji', 'Segoe UI Symbol', 
               'Noto Color Emoji';
  font-size: 14px;
  color: #333;
  background-color: #fff;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* 链接样式 */
a {
  color: #409eff;
  text-decoration: none;
  
  &:hover {
    color: #66b1ff;
  }
}

/* 图片样式 */
img {
  max-width: 100%;
  height: auto;
  vertical-align: middle;
}

/* 按钮样式 */
button {
  outline: none;
  border: none;
  background: none;
  cursor: pointer;
}

/* 输入框样式 */
input, textarea, select {
  outline: none;
  border: 1px solid #dcdfe6;
  border-radius: 4px;
  font-family: inherit;
}

/* 列表样式 */
ul, ol {
  list-style: none;
}

/* 标题样式 */
h1, h2, h3, h4, h5, h6 {
  font-weight: 500;
  line-height: 1.2;
}

/* 容器样式 */
.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
}

/* 响应式容器 */
@media (max-width: 768px) {
  .container {
    padding: 0 15px;
  }
}

/* 工具类 */
.text-center {
  text-align: center;
}

.text-left {
  text-align: left;
}

.text-right {
  text-align: right;
}

.clearfix::after {
  content: '';
  display: table;
  clear: both;
}

.float-left {
  float: left;
}

.float-right {
  float: right;
}

.hidden {
  display: none !important;
}

.visible {
  display: block !important;
}

/* 间距工具类 */
.mt-10 { margin-top: 10px; }
.mt-20 { margin-top: 20px; }
.mt-30 { margin-top: 30px; }
.mb-10 { margin-bottom: 10px; }
.mb-20 { margin-bottom: 20px; }
.mb-30 { margin-bottom: 30px; }
.ml-10 { margin-left: 10px; }
.ml-20 { margin-left: 20px; }
.mr-10 { margin-right: 10px; }
.mr-20 { margin-right: 20px; }

.pt-10 { padding-top: 10px; }
.pt-20 { padding-top: 20px; }
.pt-30 { padding-top: 30px; }
.pb-10 { padding-bottom: 10px; }
.pb-20 { padding-bottom: 20px; }
.pb-30 { padding-bottom: 30px; }
.pl-10 { padding-left: 10px; }
.pl-20 { padding-left: 20px; }
.pr-10 { padding-right: 10px; }
.pr-20 { padding-right: 20px; }

/* 颜色工具类 */
.text-primary { color: #409eff; }
.text-success { color: #67c23a; }
.text-warning { color: #e6a23c; }
.text-danger { color: #f56c6c; }
.text-info { color: #909399; }
.text-muted { color: #999; }

/* 布局工具类 */
.d-flex {
  display: flex;
}

.flex-column {
  flex-direction: column;
}

.justify-content-center {
  justify-content: center;
}

.justify-content-between {
  justify-content: space-between;
}

.align-items-center {
  align-items: center;
}

.flex-1 {
  flex: 1;
}

/* 卡片样式 */
.card {
  background: #fff;
  border-radius: 8px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
  overflow: hidden;
  
  &.hover-shadow {
    transition: box-shadow 0.3s;
    
    &:hover {
      box-shadow: 0 4px 16px rgba(0, 0, 0, 0.15);
    }
  }
}

.card-header {
  padding: 16px 20px;
  border-bottom: 1px solid #ebeef5;
  background: #f8f9fa;
}

.card-body {
  padding: 20px;
}

.card-footer {
  padding: 16px 20px;
  border-top: 1px solid #ebeef5;
  background: #f8f9fa;
}

/* 加载状态 */
.loading {
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 40px;
}

/* 空状态 */
.empty {
  text-align: center;
  padding: 60px 20px;
  color: #909399;
  
  .empty-icon {
    font-size: 64px;
    color: #ddd;
    margin-bottom: 16px;
  }
  
  .empty-text {
    font-size: 16px;
  }
}

/* 标签样式 */
.tag {
  display: inline-flex;
  align-items: center;
  padding: 4px 12px;
  font-size: 12px;
  border-radius: 16px;
  background: #f0f0f0;
  color: #666;
  
  &.tag-primary {
    background: #ecf5ff;
    color: #409eff;
  }
  
  &.tag-success {
    background: #f0f9ff;
    color: #67c23a;
  }
  
  &.tag-warning {
    background: #fdf6ec;
    color: #e6a23c;
  }
  
  &.tag-danger {
    background: #fef0f0;
    color: #f56c6c;
  }
}

/* 面包屑导航 */
.breadcrumb {
  display: flex;
  align-items: center;
  font-size: 14px;
  color: #666;
  
  .breadcrumb-item {
    &:not(:last-child)::after {
      content: '/';
      margin: 0 8px;
      color: #ddd;
    }
    
    a {
      color: #666;
      
      &:hover {
        color: #409eff;
      }
    }
    
    &:last-child {
      color: #333;
    }
  }
}

/* 滚动条样式 */
::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}

::-webkit-scrollbar-track {
  background: #f1f1f1;
}

::-webkit-scrollbar-thumb {
  background: #c1c1c1;
  border-radius: 4px;
  
  &:hover {
    background: #a8a8a8;
  }
}